package cn.edu.scau.cmi.lvmingyan.client;

import java.util.Scanner;

import cn.edu.scau.cmi.lvmingyan.simpleFactoryMethod.domain.Beef;
import cn.edu.scau.cmi.lvmingyan.simpleFactoryMethod.domain.Chicken;
import cn.edu.scau.cmi.lvmingyan.simpleFactoryMethod.domain.Meat;
import cn.edu.scau.cmi.lvmingyan.simpleFactoryMethod.domain.Pork;


public class SimpleFactory {

	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		String meatName;
		Meat meat = null;
	    System.out.print("please input the name(pork.chicken.beef) of meat you liked or input exit to exit:");
	    meatName=scanner.nextLine();
		while(meatName.equals("exit")!=true)
		{
		switch(meatName)
		{
		case "beef": meat = new Beef();break;
		case "pork": meat = new Pork();break;
		case "chicken": meat = new Chicken();break;
		default:System.out.println("no this kind of meat !!!please input again");
		}
		System.out.print("please input the name(pork.chicken.beef) of meat you liked or input exit to exit:");
		meatName=scanner.nextLine();
	}
		System.out.println("over!");
	}

}
